]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
layout: Use monitor index when adding bg managers
authorAdel Gadllah <adel.gadllah@gmail.com>
Wed, 2 Oct 2013 13:48:39 +0000 (15:48 +0200)
committerAdel Gadllah <adel.gadllah@gmail.com>
Wed, 2 Oct 2013 13:58:22 +0000 (15:58 +0200)
Don't assume that this._bgManagers.push() (i.e adding to the end) is always
correct.

On startup we call _createPrimaryBackground which passes in the primary index
which may not be 0.

js/ui/layout.js

index 9024695db0f0189335e96f6896bff3243864045f..12717091cc9bbdc1ca1e5d9cfa685f48589736e3 100644 (file)
@@ -362,7 +362,7 @@ const LayoutManager = new Lang.Class({
                               BackgroundMenu.addBackgroundMenu(bgManager.background.actor);
                           }));
 
-        this._bgManagers.push(bgManager);
+        this._bgManagers[monitorIndex] = bgManager;
 
         return bgManager.background;
     },